import { ref,onMounted,computed} from 'vue';

export default function useSum() {
  const sum = ref(0)

  function add() {
    sum.value++
  }
  let  bigSum = computed(()=>{
    return sum.value * 10
  })
  onMounted(()=>{
    add()
    console.log('Sum挂载完成')
  })
  // 返回数据
  return {sum,add,bigSum}
}
